#include "TcpClass.h"

int main()
{
	char buff[1024];
    TcpSocket ts;
    TcpSockConnect(&ts,"127.0.0.1",9999);
	while(fgets(buff,sizeof(buff),stdin) != NULL)
	{
		TcpSockSend(&ts,buff,strlen(buff)-1);
		memset(buff,0,sizeof(buff));
		TcpSockRecv(&ts,buff,sizeof(buff));
		printf("Echo: %s\n",buff);
		memset(buff,0,sizeof(buff));
	}
    TcpSockClose(&ts);
    return 0;
}